<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/webwork" prefix="ww"%>
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
  <title>Store Item List</title>
 </head>
 <body><%@ include file="/shopping-header.html"%><ww:if test="hasActionErrors()">
   <ul>
    <ww:iterator value="actionErrors">
     <li style="color: red;">
      <ww:property/>
     </li>
    </ww:iterator>
   </ul>
  </ww:if>
  
  <h3>Available Items</h3><ww:form action="UpdateCart.action" method="post">
   <table border="1">
    <tr>
     <th>Name</th>
     <th>Description</th>
     <th>Cost</th>
     <th>SKU</th>
     <th>Quantity</th>
    </tr>
    <ww:iterator value="validItems">
     <tr>
      <ww:hidden value="id"/>
      <td>
       <ww:property value="name"/>
      </td>
      <td>
       <ww:property value="description"/>
      </td>
      <td>
       <ww:property value="cost"/>
      </td>
      <td>
       <ww:property value="sku"/>
      </td>
      <td>
       <ww:textfield name="itemsMap[%{id}]" value=""/>
      </td>
     </tr>
    </ww:iterator>
   </table>
   <ww:submit value="Add to Cart"/>
  </ww:form><a href="ListCartItems.action">Show Cart Contents</a></body>
</html>